home *** CD-ROM | disk | FTP | other *** search
/ CD ROM Paradise Collection 4 / CD ROM Paradise Collection 4 1995 Nov.iso / win / rtfhelp.zip / MAKEFILE < prev    next >
Text File  |  1994-11-08  |  2KB  |  103 lines

  1. #    J. Hlavaty
  2. #    RTFHelp makefile
  3.  
  4. .SILENT:
  5.  
  6. # all inference rule suffixes must be in the following list
  7. #   or their inference rules will be ignored
  8. .SUFFIXES: .exe .obj .asm .c .bas .res .rc .hdc .rtf
  9.  
  10. !ifndef DEST
  11. DEST = objs                     # put object files in .\objs
  12. !endif
  13.  
  14.  
  15. OBJS     = $(DEST)\rtfhbann.obj  $(DEST)\rtfhcp85.obj   $(DEST)\rtfhdata.obj   \
  16.            $(DEST)\rtfhhelp.obj  $(DEST)\rtfhmain.obj   $(DEST)\rtfhpars.obj
  17.  
  18. ASMDBG   = -Zi -DDEBUG
  19. ASMFLAG  =
  20. MSCDBG   = -Zi -Od -DDEBUG
  21. MSCFLAG  = -c -AS -W3 -Fo$*     # subdir is prepended already to target
  22. LINKDBG  = /CO /MAP
  23. LINKFLAG = /NOD
  24. RTFFLAG  = -o -q
  25. CLIBP    = slibcep              # making a bound app
  26. CLIB     = slibcer              # link this in for a DOS app
  27.  
  28. #   nmake DEBUG=1
  29. !ifdef DEBUG
  30. ASMFLAG  = $(ASMFLAG)  $(ASMDBG)
  31. MSCFLAG  = $(MSCFLAG)  $(MSCDBG)
  32. LINKFLAG = $(LINKFLAG) $(LINKDBG)
  33. !endif
  34.  
  35. #   nmake LIST=1
  36. !ifdef LIST
  37. ASMFLAG  = $(ASMFLAG)  -l
  38. LINKFLAG = $(LINKFLAG)
  39. !endif
  40.  
  41. .rc.res:  ; $(RC) $(RCFLAGS) $*.rc
  42.  
  43. .c.obj:   ; $(CC) $(MSCFLAG) $*.c
  44.  
  45. .asm.obj: ; masm $(MFLAGS) $*.asm;
  46.  
  47. .hdc.rtf: ; rtfhelp $(RTFFLAG) $*.hdc
  48.  
  49. .rtf.hlp: ; hc31 $*
  50.  
  51. all: output verifydirs rtfhelp.exe sample.hlp
  52.  
  53. #pseudo-target to let us know what our options are
  54. output:
  55.   echo MSC == $(MSCFLAG)    LINK == $(LINKFLAG)
  56.  
  57. verifydirs:
  58.   mkdir objs
  59.  
  60. help: sample.hlp
  61.  
  62. sample.hlp: sample.rtf
  63.  
  64. sample.rtf: sample.hdc rtfhelp.exe
  65.  
  66. # note we can force a link of the real EXE in $(DEST) by
  67. #   erasing the copy in the current dir.
  68. rtfhelp.exe : $(OBJS)
  69.     link @<<rtfhelp.lnk
  70. os2.lib $(LINKFLAG) $**, objs\$@,, $(CLIBP), ;
  71. <<KEEP
  72.     cd $(DEST)
  73.     bind $*
  74.     copy $@ ..
  75.     copy $@ ..\test > nul
  76.     cd ..
  77.  
  78. $(DEST)\rtfhbann.obj : rtfhbann.c
  79.        $(CC) $(MSCFLAG) rtfhbann.c
  80.  
  81. $(DEST)\rtfhcp85.obj : rtfhcp85.c rtfhelp.h
  82.        $(CC) $(MSCFLAG) rtfhcp85.c
  83.  
  84. $(DEST)\rtfhdata.obj : rtfhdata.c rtfhelp.h
  85.        $(CC) $(MSCFLAG) rtfhdata.c
  86.  
  87. #$(DEST)\rtfhgent.obj : rtfhgent.c rtfhelp.h
  88. #      $(CC) $(MSCFLAG) rtfhgent.c
  89.  
  90. $(DEST)\rtfhhelp.obj : rtfhhelp.c rtfhelp.h
  91.        $(CC) $(MSCFLAG) rtfhhelp.c
  92.  
  93. $(DEST)\rtfhmain.obj : rtfhmain.c rtfhelp.h
  94.        $(CC) $(MSCFLAG) rtfhmain.c
  95.  
  96. $(DEST)\rtfhpars.obj : rtfhpars.c rtfhelp.h
  97.        $(CC) $(MSCFLAG) rtfhpars.c
  98.  
  99. sample.rtf : sample.hdc
  100.  
  101. sample.hlp : sample.rtf
  102.  
  103.